package org.jcut.controller;

import org.jcut.data.Data;
import org.jcut.service.IDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/detail")
@RestController
public class DetailsController {
	@Autowired
	private IDetailsService service;
	@Autowired
	private Data data;
	/**
	 * @author 胡琪
	 * @param t_id(必填)
	 * */
	@RequestMapping(value = "/select",params = {"c_id"},method = RequestMethod.GET)
	public Data select(@RequestParam(value="c_id")String c_id) {
		data.setData(service.select(c_id));
		data.setMsg("查询成功！");
		data.setStatus("1");
		return data;
	}
}
